﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once

#include "GmFamilyService.h"

namespace gfam
{
    
    ///\brief 解算结果
    enum class FamilySolverResult : int32_t
    {
        Ok,                     ///<解算成功
        Error,                  ///<约束定义不正确
        Overconstrained,        ///<约束过多
        Unreasonable,           ///<约束不合理
        TooManyParams,          ///<约束添加失败
        EntityUpdateFailed ,    ///<实体更新不成功，可能轮廓线出现自交
        LoopDependency ,        ///<存在循环依赖
        OutOfRange,             ///<坐标值超出合理范围
        TooShortLine ,          ///<存在过短的直线段
        TooLongLine,            ///<存在过长的直线段
        TooSmallRadius,         ///<存在半径（半轴长度）过小的圆弧（椭圆弧）
        TooLargeRadius,         ///<存在半径（半轴长度）过大的圆弧（椭圆弧）
        NotCoplanar             ///<约束对象不共面
    };

    /// \brief 获取解算结果字符串
    /// 
    /// \param solverResult 解算结果
    /// \return 输出字符串
    GM_FAMILY_SERVICE_EXPORT std::wstring GetSolverResultString(FamilySolverResult solveResult);

}

